<include file="./Tm/Dt/Top.html" />

<include file="./Tm/Dt/Left.html" />
<script>
    //倒计时
    function daojishi(miao,ti,i){
        var times=miao;
        ti = setInterval(daoji,1000);
        function daoji(){

            if(times <= 0){
                clearInterval(ti);
                $('#lasttime'+i).html(0);
                return;
            }else{
                times--;
            }
            var hours = parseInt(times/3600) < 10 ? "0"+ parseInt((times/3600)) : parseInt(times/3600);
            var second = times%60 < 10 ? "0"+ (times%60) : times%60;
            var minutes = ((times-hours*3600-second)/60)//- < 10 ? "0"+ (times-second)/60 : ((times-second)/60);
            $('#lasttime'+i).html(hours+":"+minutes+":"+second);


        }

    }



</script>


<div id="right">
    <include file="./Tm/Dt/Nav.html" />
    <!--主要内容块-->
    <script type="text/javascript" src="__PUBLIC__/Dt/lib/jedate/jedate.min.js" ></script>

    <!--主要内容块-->
    <div class="main">
        <div class="panel panel-primary">
            <div class="panel-body panel-heading">
                <h3 class="panel-title">得到帮助列表</h3>
            </div>
            <div class="helplist">

                <div class="panel-body">
                    <h4>得到帮助排单号：{$vo.orderid}</h4>
                    <ul>
                        <li>参加者：{$vo.username}</li>
                        <li>得到帮助数额：RMB {$vo.price}</li>
                        <li>排队日期：{$vo.createtime|date='Y-m-d H:i:s',###}</li>
                        <li>当前状态：<span class="color-d84a38">
                            <switch name="vo.status">
                                <case value="0"><if condition="$vo.surplus gt 0">排队中，剩余{$vo.surplus}等待匹配<else />排队中，等待匹配</if></case>
                                <case value="1">匹配完成，等待打款</case>
                                <case value="2">打款完成，等待确认</case>
                                <case value="3">确认完成，成功提供帮助</case>

                            </switch>

                        </span></li>


                    </ul>
                </div>
                <if condition="$vo.status gt 0 or $vo.surplus gt 0">
                    <volist name="vo.sub" id="vo1">
                        <div class="panel-footer container-fluid bg-f0">
                            <div class="row">
                                <ul class="biaot">
                                    <li class="col-sm-3">
                                        <p>{$vo1.orderid}</p>
                                        <p><span class="color-35aa47"><switch name="vo1.status">
                             <case value="1">
                            等待确认打款
                             </case>
                             <case value="2">
                                已经打款
                             </case>
                             <case value="3">
                                 已经收款，订单完成
                             </case>
                         </switch></span></p>
                                    </li>
                                    <li class="col-sm-3">
                                        <p>匹配日期</p>
                                        <p>{$vo1.begintime|date='Y-m-d H:i:s',###}</p>
                                    </li>
                                    <li class="col-sm-2">
                                        <p>匹配用户</p>
                                        <p>{$vo1.username}</p>
                                       </li>
                                    <li class="col-sm-2"><p>匹配金额</p>
                                        <p>RMB
                                            <if condition="vo.price gt vo1.price">
                                                <php>if($vo['price']>$vo1['price']){</php>
                                                {$vo1.price}
                                                <php>}else{</php>
                                                {$vo.price}
                                                <php>}</php>
                                            </if>
                                        </p></li>

                                </ul>
                            </div>
                            <div>
                                <div class="table-responsive">
                                    <table class="table">

                                        <tr>
                                            <td width="120px">支付宝：</td>
                                            <td>{$vo1.alipay}</td>
                                        </tr>
                                        <tr>
                                            <td>银行信息：</td>
                                            <td>{$vo1.bank} / {$vo1.bankcode}/ {$vo1.bankname}</td>
                                        </tr>
                                        <tr>
                                            <td>联络接收人：</td>
                                            <td>{$vo1.realname}:{$vo1.mobile}</td>
                                        </tr>
                                        <tr>
                                            <td>联络推荐人：</td>
                                            <td>{$vo1.trealname}:{$vo1.tmobile}</td>
                                        </tr>
                                        <tr>
                                            <td>打款倒计时：</td>
                                            <td><if condition="$vo1.status eq 1">
                                                <div  id="lasttime{$vo1.id}"> </div>
                                                <script>daojishi("<php>echo 12*3600-(time()-$vo1['begintime']);</php>",'it{$vo1.id}','{$vo1.id}');</script>
                                                <else />
                                                0
                                            </if></td>
                                        </tr>
                                        <tr>
                                            <td>凭据图片</td>
                                            <td>

                                                <a href="{$vo1.pic}" target="_blank"><img   src="{$vo1.pic}" class="btnbg" style="width:100px;height:100px;left:0px;z-Index:-1;"/></a>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                                <div class="pull-left" id="pull{$vo.id}_{$vo1.id}">

                                    <switch name="vo1.status">
                                        <case value="1">
                                            等待打款
                                        </case>
                                        <case value="2">
                                            请输入安全密码：<input id="password{$vo.id}_{$vo1.id}" type="password" name="password{$vo.id}_{$vo1.id}" placeholder="输入安全密码" ><br><br>
                                            <button type="button" class="btn btn-primary"  id="button{$vo.id}_{$vo1.id}"  onclick="pipeifinish('{$vo.id}','{$vo1.id}')">确认收款</button>
                                        </case>
                                        <case value="3">
                                            已经收款，订单完成
                                        </case>
                                    </switch>



                                </div>

                            </div>
                        </div>
                    </volist>
                </if>
                <input id="id" type="hidden" name="id" value="{$Think.session.userid}">

                <include file="./Tm/Dt/Page.html" />
            </div>
        </div>
    </div>
</div>


<include file="./Tm/Dt/Foot.html" />
<script src="__PUBLIC__/Dt/Home/lgethelp.js" type="text/javascript" charset="utf-8"></script>